package com.wxx.转换成小写字母;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/4/11 20:37
 */
public class Solution {
    public static String toLowerCase(String s) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) >= 65 && s.charAt(i) <= 90) {
                builder.append((char)(s.charAt(i) + 32));
            } else {
                builder.append(s.charAt(i));
            }

        }
        return builder.toString();
    }

    public static void main(String[] args) {
        System.out.println(toLowerCase("Hello"));
        System.out.println(toLowerCase("here"));
        System.out.println(toLowerCase("LOVELY"));
    }
}
